#include "diasettings.h"
#include "ui_diasettings.h"

DiaSettings::DiaSettings(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DiaSettings)
{
    ui->setupUi(this);
}

DiaSettings::~DiaSettings()
{
    delete ui;
}

bool DiaSettings::getAutoSave(){
    return this->ui->checkBox_autosave->checkState();
}

int DiaSettings::getRecentSize(){
    return this->ui->spinBox->value();
}

void DiaSettings::setAutoSave(bool autosave){
    if(autosave){
        this->ui->checkBox_autosave->setCheckState(Qt::Checked);
    }else{
        this->ui->checkBox_autosave->setCheckState(Qt::Unchecked);
    }

}

void DiaSettings::setRecentSize(int recentsize){
    this->ui->spinBox->setValue(recentsize);
}


void DiaSettings::setCountRec1(int count){
    this->ui->sb_r1->setValue(count);
}

void DiaSettings::setCountRec2(int count){
    this->ui->sb_r2->setValue(count);
}

int DiaSettings::getCountRec1(){
    return this->ui->sb_r1->value();
}

int DiaSettings::getCountRec2(){
    return this->ui->sb_r2->value();
}
